Installing Linux software, different methods pros and cons

On Windows, software is typically installed by running a downloaded .exe or .msi, or by extracting a .zip to a folder, or more recently through the system-managed Windows Store. Dependencies may need to be explicitly installed by the user or are included in the application statically. Historically, Windows software is not well managed by the system, and each app may or may not have its own mechanism for updating, and there is little attention to security or sandboxing, and apps share very few 3rd party libraries compared to Linux. This may improve with Linux-like package systems (Chocolatey) gaining popularity, and Windows Store.

On Linux various install methods have different trade-offs such as automatic updates to latest versions, different degrees of sandboxing, different degrees of bundling dependencies, and so on. Compared with installing Windows apps, which usually involve downloading and running an installer file, Linux apps are usually installed via the Ubuntu Software app, or apt/snap repositories.

FIRST AND FOREMOST, when installing an app, go to its official site and thoroughly read its official install instructions! If there are not any clear instructions, try web search “install {app name} on Ubuntu”, and make sure the instructions are recent and apply to your app and OS version. Having said that, 90% of the time the instructions will just be run: sudo apt install {app name}

The main installation methods are apt and snap. In some cases if the app is new or not common, you may need to add its repository to apt first before installing, and the official install instructions for that app will tell you how to do that.

More detailed list of common software install methods:

User-friendly GUI “App Stores”

  • Ubuntu Software - The default GUI app store in Ubuntu Desktop. It now supports Snap, Flatpak and others if you add their repos.

  • KDE Discover - The default GUI app store in KDE desktop or Kubuntu.

Package/Repository manager

Some of these methods have websites, giving them friendly “App Store” usability, but under the hood they utilize simple terminal commands which you can simply run yourself. My order of preference for installing apps from repositories is below, and the only reason to go to the next method is if I want a newer version than the previous provides or if I something breaks in the package.

  • apt (Aptitude). This is often the first port of call for installing anything on Ubuntu/Debian. The long-standing default for Ubuntu/Debian. Uses PPA repositories to find, update and install software. Install apps using sudo apt install {app name}. Update all apps using sudo apt update then sudo apt upgrade. Apt may also install any additional required packages to run the app. Non-Debian distros will have their own native package manager such as pacman on Arch and the AUR. The only problem with apt is that the maintainers of the repositories may not always have the latest version of some software. In that case, either add the developers own ppa (see below) or try a different installation method like Flatpak (again below).

    • Installing a specific version of software using apt: Show package info: sudo apt show {package name} Show installed and available versions: sudo apt-cache policy {package name} Install specific version: sudo apt install {package name}={version} e.g. sudo apt install apache2=2.3.35-4ubuntu1
    • Adding a new ppa (repository) to apt: Some applications may not be available in the default apt repositories or they recommend adding their own repository to your system in order to be sure you get the latest version. The easiest way is to run a command e.g. sudo add-apt-repository ppa:libreoffice/libreoffice-7-0 To remove a ppa, see here, or manually remove from either editing /etc/apt/sources.list file or in the folder /etc/apt/sources.list.d/
  • Flatpak (Restart or log-out/in after initial install of flatpak manager). Gaining popularity as an open alternative to Snap. Uses Flathub repository and many others. It has some of the same advantages and limitations as Snap, including a similar partial solution to theming. Install Flatseal to easily manage permissions and features for apps.

    • flatpak list to show what is installed
    • flatpak update to update all Flatpak apps
    • Globally installed apps are located /var/lib/flatpak/app. Note: Some apps may not use config files and resources stored in Home, you may need to link them to the installation folder (e.g. themes for Filezilla).
    • User config files are stored under ~/.var/app/[flatpak app name], rather than the normal locations (~/.config/)
  • Homebrew (previously Linuxbrew). Cross platform (OSX, Linux) and installs apps to the user's home, so you don’t need admin/sudo. This is often a convenient way to install software and packages are normally up to date.

    • brew install ...
    • brew upgrade
  • Snap (By Canonical - the default for future Ubuntu). Ubuntu graphical app store favors Snap. Applications are sandboxed, include dependencies bundled, and will auto-update in the background once a day. This is similar to the way apps work on Android, iOS, and Windows Store. You may need to manually enable permissions through snap for some apps to work (e.g. USB access, microphone etc). Snap is quickly becoming popular for both desktop and server apps. It is designed to work on any distro. However there are integration limitations due to the sandboxing, such as not obeying desktop environment themes (though possible if the app uses Snap API, or you have a common theme) and DPI scaling. Therefore I avoid using Snaps for complex software with a desktop GUI. It is probably fine for apps that work well in containers with complex and specific dependencies such as server apps and CLI tools.

    • snap list to show what is installed
    • sudo snap install snap-store Installs the snap-store GUI for easily managing installed snaps and changing permissions settings. For Ubuntu Gnome you dont need to install this as the built in Software Center already does it all.
    • snap install ... --classic Installs the app with "classic" confinement which allows it to access the whole system like a normal native package would. Some apps require this.
    • Installed apps are located ~/snap/

Downloaded file

Remember to make downloaded files executable via right-click file properties or chmod +x {filename}. Downloaded files will often give you the latest version of software, but the downside is that it might not automatically update the same way managed packages do, so you might need to manually check the developers website and download an updated file each time a new version comes out.

  • .deb package file can usually be double clicked to install. The installer will install any dependencies automatically. These files are specific to Debian based OS such as Ubuntu.

    • Or use terminal sudo dpkg -i {filename}
    • Or an alternative GUI tools are gdebi sudo apt install gdebi, or Qapt
  • AppImage file (Standalone runnable portable single file, no install required, works on any Linux OS)

    • You can "install" an .appimage file using the AppImageLauncher tool. This will add/remove launchers to your Desktop Environment as well as manage updates for some apps.
  • Binary/zip/folder manual install (see section below)

  • .sh file or installation script/command. Some software simply gives you a command to execute in your terminal which downloads an installer script and runs it.

Virtual machines and Docker (advanced)

Some special types of applications (typically server apps and web interfaces) may either run in their own Virtual Machine or within a container (docker).

From Source or script (advanced)

  • Many Linux apps are open source, which means you can download the source code yourself and build the application then install it (or even modify the code yourself!).
  • Only use if the instructions explicitly require it or you need a specific version of the app which is not available as a binary release, or you want to modify the code.
  • Typically you would either git clone the code or download a source archive (usually .tar.gz), extract it, install any required development tools/libraries, and run a command or two in the extracted directory e.g. make or ./install.sh. Once built and installed, you can usually delete the downloaded code.

More detailed comparisons

https://askubuntu.com/questions/866511/what-are-the-differences-between-snaps-appimage-flatpak-and-others

Where to install system wide applications manually?

e.g. single file binary or zipped folder applications

Small single file utilities:/opt/bin/
Larger applications:/opt/{app name}/

If you have trouble running it after installing, try:

  • Remember to add the app to your path if required: Add the line to ~/.profile: export PATH="$PATH:/opt/{app name}/bin"
  • OR create a symbolic link in the /opt/bin folder to the executable
  • Make sure the executable has +x permision: sudo chmod +x {executable-file-name}
  • Create a launcher (shortcut) to it (see "Adding an icon shortcut" in chapter 4)

Installing Fonts

Simple install: In Ubuntu Gnome you can double click a font file and click the install button.

Or Manually install system-wide fonts to: /usr/local/share/fonts/

Or Manually install user fonts to either ~/.fonts or ~/.local/share/fonts/

You can use sub-folders to organise

Drivers in Linux

  • Linux Drivers are generally compiled into the kernel (either directly or using modules loaded during runtime), unlike Windows which has separately running drivers.

  • Some hardware vendors only make Windows drivers, but its usually fine, as unlike Windows, it is rare to have to download and install a driver since support for most hardware is already part of the Linux kernel. A notable exception is Nvidia who are heavily proprietary compared with AMD graphics. You will need to download and install an Nvidia driver separately.

  • By default, open source drivers are preferred, but closed source (proprietary) drivers can also be chosen. Some may have benefits of features or performance.

  • modprobe can be used to install/remove modules

  • lsmod lists loaded modules

  • More: https://www.poftut.com/modprobe-lsmod-modinfo-command-tutorial-with-examples-to-load-list-linux-kernel-modules/

  • dpkg is the Debian low level package tool which is often used to install drivers.

  • You can look for installed driver packages using for example: dpkg -l | grep wacom

  • For some very new hardware, it may not be supported by your kernel yet. Potential options:

    • Try updating your kernel to a newer one using Mainline (might require disabling Safe-boot in your BIOS as the kernel may not be signed)
    • You could also try the newest version of a 3rd party kernel such as xanmod.
    • The community may be developing a driver but it is taking some time. If you want to test out a beta/alpha driver you would likely need to compile it yourself or patch and compile your own kernel. If the developer is successful, the driver will eventually be added to the latest Linux Kernel, so you could also just wait for it.

Awesome Software to Install

This is just a list of awesome software I use. There may be alternatives but these are the ones where the most awesome I could find at the time.

  • Other tools and tweaks:
    • Neofetch
    • Veracrypt
    • MenuLibre
  • Good extras: https://www.youtube.com/watch?v=qTsPLCJdbJw
    • Ungoogled Chromium and Firefox
    • Firefox or Google Chrome browser with extensions:
      • Ublock origin
      • Improve YouTube
      • Stylebot
      • Bitwarden⭐
      • Floccus bookmark Sync
    • Gnome tweak tool
    • gTile
    • Ubuntu Restricted extras (codecs)
    • GsConnect
    • VLC or alternatively mpv or Celluloid
    • Calibre (Ebooks)
    • Filezilla
    • Chrome Remote Desktop
    • Virtual Box
    • Enable Canonical Partners in Software Update
    • Ferdi⭐
  • Interesting alternatives:
    • uGet download manager (alt to web browser)
    • MPV video player (lite alt to VLC)⭐
    • Gparted (alt to Gnome disk utility)
  • Local scratchpad options (autosaving notepads):
    • Notepadqq (Notepad++ clone)
    • Xpad (sticky notes style)
    • Zim (wiki style)
  • Development:
  • Content Creation:
    • Gimp⭐, Krita, Inkscape, Xournal++
    • KDenLive⭐ (flatpak worked best for Gnome, Snap for KDE), Audacity
    • Foxit PDF Reader
    • PDF-Arranger
    • Mark Text ⭐ (WYSIWYG markdown editor) or StackEdit (cloud)
  • Other options:
    • gufw (firewall with GUI)
    • TLP (power management)
    • KDE extensions/Plasmoids
    • Intel P-state and CPUFreq Manager Widget
    • Caffeine